import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import '@/util/directive' // 引入全局指令
import VueLazyLoad from 'vue-lazyload'
import Router from 'vue-router'
// 解决这个错误：Uncaught (in promise) NavigationDuplicated {_name: "NavigationDuplicated", name: "NavigationDuplicated"}；
const routerPush = Router.prototype.push
Router.prototype.push = function push (location) {
  return routerPush.call(this, location).catch(error => error)
}
Vue.config.productionTip = false
Vue.use(VueLazyLoad, {
  error: 'error',
  loading: 'loading'
})
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
